/*
 * @Author: 吴竹叶 2107206923@qq.com
 * @Date: 2023-09-26 09:49:34
 * @LastEditors: 吴竹叶 2107206923@qq.com
 * @LastEditTime: 2023-11-06 10:37:15
 * @FilePath: \BZ_JT_AnQuanHuanBaoGuanLiApp\src\api\enterprise.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
import qs from 'qs'
// -------------------------------------------------- 企业列表信息 -------------------------------------------------- //

/**
 * 查询企业信息数据  四个模块通用,都是返回的41家企业基本信息,使用环保模块返回的接口
 *
 * @export
 * @params {*}
 * @return {*}
 */
export const aqCompanyList = (data) => {
  return request({
    url: '/admin/aq/AqCompany/getCompanyList',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export const hbCompanyList = (data) => {
  return request({
    url: '/admin/hb/HbCompany/getCompanyList',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export const HbPermitCount = (data) => {
  return request({
    url: '/admin/hb/HbdeviceManagement/HbPermitCount',
    method: 'POST',
    data: qs.stringify(data)
  })
}
export const xfCompanyList = (data) => {
  return request({
    url: '/admin/xf/XfCompany/getCompanyList',
    method: 'POST',
    data: qs.stringify(data)
  })
}
export const nyCompanyList = (data) => {
  return request({
    url: '/admin/ny/NyCompany/getCompanyList',
    method: 'POST',
    data: qs.stringify(data)
  })
}
// -------------------------------------------------- 安全基本信息 -------------------------------------------------- //

/**
 * 安全-基本信息
 * @export
 * @params {*}
 * @return {*}
 */
export const aqCompanyInfo = (data) => {
  return request({
    url: '/admin/aq/AqCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 安全-安全生产支出（年度）列表
 * @export
 * @params {*}
 * @return {*}
 */
export const getCostLedgerList = (data) => {
  return request({
    url: '/admin/aq/AqProductPlan/getCostLedgerList',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 安全--企业生产许可证信息
 * @param {*} data
 * @returns
 */
export const aqSecurityPermitInfo = (data) => {
  return request({
    url: '/admin/aq/AqCompany/getSecurityPermitInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 安全--企业安全生产标准化建设情况
 * @param {*} data
 * @returns
 */
export const aqStandardConstructionInfo = (data) => {
  return request({
    url: '/admin/aq/AqCompany/getStandardConstructionInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 安全--企业荣誉信息
 * @param {*} data
 * @returns
 */
export const getCompanyHonorList = (data) => {
  return request({
    url: '/admin/aq/AqCompany/getCompanyHonorList',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/**
 * 单位风险单元-企业厂区列表
 *
 * @export
 * @params {*}
 * @return {*}
 */
export const companyFactory = (data) => {
  return request({
    url: '/admin/aq/RiskManagement/companyFactory',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/**
 * 单位风险单元-风险四色图
 *
 * @export
 * @params {*}
 * @return {*}
 */
export const companyRiskFile = (data) => {
  return request({
    url: '/admin/aq/RiskManagement/companyRiskFile',
    method: 'POST',
    data: qs.stringify(data)
  })
}

// -------------------------------------------------- 环保 -------------------------------------------------- //

/**
 * 企业详情
 * @param {*} data
 * @returns
 */
export const companyInfoEnvironment = (data) => {
  return request({
    url: '/admin/hb/HbCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 环保-基本信息
 * @export
 * @params {*}
 * @return {*}
 */
export const hbCompanyInfo = (data) => {
  return request({
    url: '/admin/hb/HbCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
* 企业信息管理-员工人数
*
* @export
* @params {*}
* @return {*}
*/
export const getCompanyEmployeesUpdateVOList = (data) => {
  return request({
    url: '/admin/hb/HbCompany/getCompanyEmployeesUpdateVOList',
    method: 'GET',
    params: data
  })
}
// -------------------------------------------------- 消防 -------------------------------------------------- //

/**
 * 企业详情
 * @param {*} data
 * @returns
 */
export const companyInfoFireFighting = (data) => {
  return request({
    url: '/admin/xf/XfCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
 * 消防-基本信息
 * @export
 * @params {*}
 * @return {*}
 */
export const XfCompanyInfo = (data) => {
  return request({
    url: '/admin/xf/XfCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
* 企业信息管理-企业详情-员工人数变更
*
* @export
* @params {*}
* @return {*}
*/
export const getXfCompanyEmployeesUpdateVOList = (data) => {
  return request({
    url: '/admin/xf/XfCompany/getCompanyEmployeesUpdateVOList',
    method: 'POST',
    data: qs.stringify(data)
  })
}
// -------------------------------------------------- 能源 -------------------------------------------------- //

/**
 * 企业详情
 * @param {*} data
 * @returns
 */
export const companyInfoEnergySources = (data) => {
  return request({
    url: '/admin/ny/NyCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/**
 * 能源-基本信息
 * @export
 * @params {*}
 * @return {*}
 */
export const NyCompanyInfo = (data) => {
  return request({
    url: '/admin/ny/NyCompany/getCompanyInfo',
    method: 'POST',
    data: qs.stringify(data)
  })
}
/**
* 企业信息管理-详情-变更历史
*
* @export
* @params {*}
* @return {*}
*/
export const getNyCompanyEmployeesUpdateVOList = (data) => {
  return request({
    url: '/admin/ny/NyCompany/getCompanyEmployeesUpdateVOList',
    method: 'POST',
    data: qs.stringify(data)
  })
}
